home *** CD-ROM | disk | FTP | other *** search
/ Painter Bear's Language Bridge — Italian / Bridge_ponte_itialian.iso / pc / helpers / open.dxr / 00008_Parent For Timer.ls < prev    next >
Encoding:
Text File  |  2001-02-22  |  405 b   |  27 lines

  1. property myStartTime, myTime, isStarted
  2.  
  3. on new me
  4.   set myTime to 0
  5.   set myStartTime to 0
  6.   set isStarted to 0
  7.   return me
  8. end
  9.  
  10. on startTheTimer me
  11.   set myStartTime to the timer
  12.   set isStarted to 1
  13. end
  14.  
  15. on reportTimer me
  16.   if isStarted = 1 then
  17.     set myTime to integer(the timer - myStartTime)
  18.   else
  19.     set myTime to 0
  20.   end if
  21. end
  22.  
  23. on stopTimer me
  24.   set isStarted to 0
  25.   set myStartTime to 0
  26. end
  27.